/*
 * AscMagnetMonitorSite.java
 *
 * Created on August 27, 2002, 1:23 PM
 *
 * Copyright (c) 2002 The General Electric Company
 */

package com.ge.healthcare.autosc.processor.magmon;

import com.ge.healthcare.autosc.common.util.dataItem.IASCTextDataItem;
import com.ge.healthcare.autosc.processor.exception.MagnetMonitorSiteException;

/**
 * Interface for accessing and updating a magnet monitor site.
 *
 * @author Daniel S. Horwitz, Compuware Corp.
 *
 * @version AutoSC P5P6
 */
public interface IMagnetMonitorSite
{
    /**
     * Select the site to use for subsequent operations.  This only
     *  defines the site, the existence of the site is checked when
     *  used.
     *
     * @param systemId The system identifier of the site to use for subsequent
     *   operations.  The identifier is assumed to be non-null.
     */
    void selectSite( String systemId );

    /**
     * Does the site exist?
     *
     * @return True if the site exists, false if not.
     *
     * @exception AscServiceAbortException If no site is currently selected.
     */
    boolean exists();

    /**
     * Get the specified data item from the site.
     *
     * @param key The key used to identified the data item.
     *
     * @return The specified data item.
     *
     * @exception AscServiceAbortException If no site is currently selected
     *  or a reserved value is used as the key.
     */
    IASCTextDataItem get( String key ) throws MagnetMonitorSiteException;

    /**
     * Perform any clean-up required.  This should be called when done
     *  with the magnet monitor site.  This typically involves things like
     *  closing files and removing locks.
     */
    void cleanUp();
}
